package com.duotai.demo;

public class test {
    public static void main(String[] args) {
        useAnimal(new Cat());
    }
    public static void useAnimal(Animal a){
        a.eat();
        if (a instanceof Cat){
            Cat c = (Cat) a;
            c.catchMouse();
        }
    }
}
